Overhauling SC atomics in C11 and OpenCL

ثبت نشده
چکیده

Despite the conceptual simplicity of sequential consistency (SC), the semantics of SC atomic operations and fences in the C11 and OpenCL memory models is subtle, leading to convoluted prose descriptions that translate to complex axiomatic formalisations. We conduct an overhaul of SC atomics in C11, reducing the associated axioms in both number and complexity. A consequence of our simplification is that the SC operations in an execution no longer need to be totally ordered. This relaxation enables, for the first time, efficient and exhaustive simulation of litmus tests that use SC atomics. We use our improved C11 model to present the first rigorous memory model formalisation for OpenCL (which extends C11 with support for heterogeneous many-core programming). In the OpenCL setting, we refine the SC axioms still further to give a sensible semantics to SC operations that employ a ‘memory scope’ to restrict their visibility to specific threads. Our overhaul requires slight strengthenings of both the C11 and the OpenCL memory models, causing some behaviours to become disallowed. We argue that these strengthenings are natural, and prove that all of the formalised C11 and OpenCL compilation schemes of which we are aware (Power and x86 for C11, AMD GPU for OpenCL) remain valid in our revised models. Using the HERD memory model simulator, we show that our overhaul leads to an exponential improvement in simulation time for C11 litmus tests compared with the original model, making exhaustive simulation competitive, time-wise, with the non-exhaustive CDSChecker tool.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Taming the complexities of the C11 and OpenCL memory models

We study how the C11 memory model can be simplified and how it can be extended. Our first contribution is to propose a mild strengthening of the model that enables the rules pertaining to sequentially-consistent (SC) operations to be significantly simplified. We eliminate one of the total orders that candidate executions must range over, leading to a model that is significantly faster to simula...

متن کامل

Lowering C11 Atomics for ARM in LLVM

This report explores the way LLVM generates the memory barriers needed to support the C11/C++11 atomics for ARM. I measure the influence of memory barriers on performance, and I show that in some cases LLVM generates too many barriers. By leaving these barriers out, performance increases significantly. I introduce two LLVM passes, which will remove these extra barriers, improving performance in...

متن کامل

Warps and Atomics: Beyond Barrier Synchronization in the Verification of GPU Kernels

We describe the design and implementation of methods to support reasoning about data races in GPU kernels where constructs other than the standard barrier primitive are used for synchronization. At one extreme we consider kernels that exploit implicit, coarse-grained synchronization between threads in the same warp, a feature provided by many architectures. At the other extreme we consider kern...

متن کامل

Shear stress-induced volume decrease in C11-MDCK cells by BK- / 4

Holtzclaw JD, Liu L, Grimm PR, Sansom SC. Shear stressinduced volume decrease in C11-MDCK cells by BK/ 4. Am J Physiol Renal Physiol 299: F507–F516, 2010. First published June 24, 2010; doi:10.1152/ajprenal.00222.2010.—Large-conductance, calcium-activated potassium channels (BK) are expressed in principal cells (PC) and intercalated cells (IC) in mammalian nephrons as BK/ 1 and BK/ 4, respectiv...

متن کامل

Size Dependence of the Elastic Properties of Pd Nanowire: Molecular Dynamics Simulation

The mechanical properties including elastic stiffness constants as well as bulk modulus of Palladium (Pd) nanowire were calculated in the constant temperature and pressure (NPT), ensemble by molecular dynamics (MD) simulation technique. The quantum Sutton-Chen (Q-SC) many-body potential was used to calculate the cohesive energy as well as forces experience by every atoms. The temperature and pr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015